home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DJLSR106.ARJ / PUTW.C < prev    next >
C/C++ Source or Header  |  1992-03-02  |  539b  |  24 lines

  1. /* This is file PUTW.C */
  2. /* This file may have been modified by DJ Delorie (Jan 1991).  If so,
  3. ** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave,
  4. ** Rochester NH, 03867-2954, USA.
  5. */
  6.  
  7. #if defined(LIBC_SCCS) && !defined(lint)
  8. static char sccsid[] = "@(#)putw.c    5.2 (Berkeley) 3/9/86";
  9. #endif LIBC_SCCS and not lint
  10.  
  11. #include <stdio.h>
  12.  
  13. putw(w, iop)
  14. register FILE *iop;
  15. {
  16.     register char *p;
  17.     register i;
  18.  
  19.     p = (char *)&w;
  20.     for (i=sizeof(int); --i>=0;)
  21.         putc(*p++, iop);
  22.     return(ferror(iop));
  23. }
  24.